import java.util.Scanner;
import java.util.regex.*;

public class Employee {
    String name;
    String address;
    String phoneNumber;
    Scanner input = new Scanner(System.in);
    
    public Employee() {
        name = "";
        address = "";
        phoneNumber = "";
    }
    
    public void standardizeAdd() {
        String a = this.address;
        String[] str = {"street", "drive", "road", "\\s+"};
        
        for (int i = 0; i < 10; i++) {
            Pattern pat = Pattern.compile(str[i], Pattern.CASE_INSENSITIVE);
            Matcher mat = pat.matcher(a);
            for(int j =0; i < a.length(); j++) {
                while(mat.find()){
                    switch(i) {
                        case 0:
                            a = mat.replaceAll("St");
                            break;
                        case 1:
                            a = mat.replaceAll("Dr");
                            break;
                        case 2:
                            a = mat.replaceAll("Rd");
                            break;
                        case 3:
                            a = mat.replaceAll(" ");
                            break;
                    }
                }
            }
        }
        this.address = a;
    }
    
    public void standardizePhone() {
        String p = this.phoneNumber;
        Pattern pat = Pattern.compile("\\D",Pattern.CASE_INSENSITIVE);
        Matcher mat = pat.matcher(p);
        
        for (int i = 0; i < p.length(); i++) {
            while(mat.find()){
                p = mat.replaceAll("-");
            }
        }
        this.phoneNumber = p;
    }
    
    public void display() {
        System.out.format("%1$20s %2$20s %3$15s\n",
                this.name, this.address, this.phoneNumber);
    }
}
